/**
 * 这里是uni-app内置的常用样式变量
 * uni-app 官方扩展插件及插件市场（https://ext.dcloud.net.cn）上很多三方插件均使用了这些样式变量
 * 如果你是插件开发者，建议你使用scss预处理，并在插件代码中直接使用这些变量（无需 import 这个文件），方便用户通过搭积木的方式开发整体风格一致的App
 */

/* 颜色变量 */

/* 行为相关颜色 */
$uni-color-primary: #FFB800;
$uni-color-primary-dark: #FF8F00;
$uni-color-primary-light: #FFE082;
$uni-color-success: #4CAF50;
$uni-color-warning: #FF9800;
$uni-color-error: #F44336;

/* 文字基本颜色 */
$uni-text-color: #333; // 基本色
$uni-text-color-inverse: #fff; // 反色
$uni-text-color-grey: #999; // 辅助灰色，如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable: #c0c0c0;

/* 背景颜色 */
$uni-bg-color: #ffffff;
$uni-bg-color-grey: #f8f8f8;
$uni-bg-color-hover: #f1f1f1; // 点击状态颜色
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色

/* 边框颜色 */
$uni-border-color: #e5e5e5;

/* 尺寸变量 */

/* 文字尺寸 */
$uni-font-size-sm: 12px;
$uni-font-size-base: 14px;
$uni-font-size-lg: 16px;
$uni-font-size-xl: 18px;
$uni-font-size-xxl: 20px;

/* 图片尺寸 */
$uni-img-size-sm: 20px;
$uni-img-size-base: 26px;
$uni-img-size-lg: 40px;

/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 4px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;

/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;

/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;

/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度

/* 文章场景相关 */
$uni-color-title: #2c405a; // 文章标题颜色
$uni-font-size-title: 20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;

/* 自定义项目颜色变量 */
$primary-yellow: #FFB800;
$primary-yellow-dark: #FF8F00;
$primary-yellow-light: #FFE082;
$background-gradient-start: #FFF8E1;
$background-gradient-end: #FFECB3;

/* 自定义混入 */
@mixin flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@mixin card-style {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.2);
}

@mixin button-primary {
  background: linear-gradient(135deg, $primary-yellow 0%, $primary-yellow-dark 100%);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.3);
  transition: all 0.3s ease;
  
  &:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(255, 184, 0, 0.3);
  }
}

@mixin button-secondary {
  background: white;
  color: $primary-yellow;
  border: 2px solid $primary-yellow;
  border-radius: 25px;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  
  &:active {
    background: $primary-yellow;
    color: white;
  }
}

@mixin input-style {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid $primary-yellow-light;
  border-radius: 12px;
  font-size: 16px;
  background: white;
  transition: border-color 0.3s ease;
  
  &:focus {
    border-color: $primary-yellow;
    outline: none;
  }
}

@mixin text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@mixin text-ellipsis-multi($lines: 2) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $lines;
  -webkit-box-orient: vertical;
}